import { getRedirectPath } from '@/utils/util'
// 视图组件
const view = {
  tabs: () => import("@/layouts/tabs"),
  blank: () => import("@/layouts/BlankView"),
  page: () => import("@/layouts/PageView")
};

// 路由组件注册
const routerMap = {
  login: {
    authority: "*",
    path: "/login",
    component: () => import("@/pages/login")
  },
  root: {
    path: "/",
    name: "首页",
    redirect: getRedirectPath(),
    component: view.tabs
  },
  enterprise: {
    name: '企业列表',
    path: '/enterprise',
    component: () => import("@/pages/enterprise/enterprise")
  },
  home: {
    name: "首页",
    component: () => import("@/pages/home/Home"),
    icon: "icon-a-shouye"
  },
  exception: {
    name: "异常页",
    icon: "warning",
    component: view.blank
  },
  exp403: {
    authority: "*",
    name: "exp403",
    path: "403",
    component: () => import("@/pages/exception/403")
  },
  exp404: {
    name: "exp404",
    path: "404",
    component: () => import("@/pages/exception/404")
  },
  exp500: {
    name: "exp500",
    path: "500",
    component: () => import("@/pages/exception/500")
  },
  // ++++++++++++++++++++++
  system: {
    name: "系统管理",
    component: view.blank,
    icon: "icon-a-shezhi"
  },
  departmentManage: {
    name: "组织管理",
    component: () => import("@/pages/systemManage/userCenter/tabs")
  }
}
export default routerMap
